package service.impl;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import dao.ClientDao;
import service.ClientManager;
import vo.Address;
import vo.Client;
import vo.OrderForm;
@Service("cm")
public class ClientManagerImpl implements ClientManager {
	@Autowired(required=true)
	private ClientDao cd;
	@Override
	public Client login(String username, String passwd) {
		System.out.println(username + passwd);
		return cd.findClient(username, passwd);
	}

	
	@Override
	@Transactional
	public int regist(Client client) {
		// TODO Auto-generated method stub
		return cd.addClient(client);
	}

 
	@Override
	@Transactional
	public int cltConsume(OrderForm orderform) {
		return cd.addOrderForm(orderform);
	}


	@Override
	@Transactional
	public int cltAdress(Address adds) {
		// TODO Auto-generated method stub
		return cd.addAddress(adds);
	}

}
